Title: Post-sale cross-sell with WooCommerce

Publish Date: Sun, 01 Jul 2018 07:00:37 +0000

Categories: Uncategorized

Content:

Have you ever seen post-sale selling techniques?




	Not long ago I was shopping at [ablank href="https://thepostmansknock.com/" nofollow=
	"true"]The Postman's Knock[/ablank] (if you want to improve your calligraphy you should check them out) and noticed that their shop runs on WooCommerce.



I purchased a product, and then on the checkout page I  noticed that they have a table of products related to their courses.



In their case, they are external products, but I thought to use that section to cross-sell some products post-sale. Let's see how to do it!







Preparing the post-sale products tempate





Open your functions.php file in wp-content/themes/your-child-theme-name/ and add this code at the end of the file:




https://gist.github.com/SiR-DanieL/22d21e46342d6467d5176668853f2e1b




This function will take care of getting the cross-sale products set for the products that have been purchased, and show them on the Thank you page.



Feel free to edit the text and HTML code to what you prefer most!



Settings cross-sell products



WooCommerce has a way to do it directly in the core.



Edit your product in Products > All Products and open the Linked Products tab. In the Cross-sells field choose the products that you want to cross-sell when that specific product is purchased:







That's all! This setup will get you a result like this, on the Thank you page:
